﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Marmat.Template.WinForm
{
    /// <summary>
    /// 明确命令类型的单据模块管理器
    /// </summary>
    /// <typeparam name="ICommand"></typeparam>
    public class ExplicitDocumentManagement<ICommand> : DocumentManagement where ICommand : IDocumentCommand
    {
        /// <summary>
        /// 构建基于DataTable的单据模块管理器
        /// </summary>
        /// <param name="command"></param>
        public ExplicitDocumentManagement(ICommand command) : base(command)
        {
        }

        /// <summary>
        /// 用户模块的命令接口。
        /// </summary>
        public new ICommand Command { get => (ICommand)base.Command; set => base.Command = value; }
    }

    /// <summary>
    /// 明确命令类型的单据模块管理器
    /// </summary>
    /// <typeparam name="Entity"></typeparam>
    /// <typeparam name="ICommand"></typeparam>
    public class ExplicitDocumentManagement<Entity, ICommand> : DocumentManagement<Entity> where ICommand : IDocumentCommand<Entity> where Entity : class, new()
    {
        /// <summary>
        /// 构建基于DataTable的单据模块管理器
        /// </summary>
        /// <param name="command"></param>
        public ExplicitDocumentManagement(ICommand command) : base(command)
        {
        }

        /// <summary>
        /// 用户模块的命令接口。
        /// </summary>
        public new ICommand Command { get => (ICommand)base.Command; set => base.Command = value; }
    }

}
